home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16578 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: portal.gmu.edu!rscernix!danpop
  2. From: danpop@mail.cern.ch (Dan Pop)
  3. Newsgroups: comp.lang.c,comp.lang.c++,comp.edu
  4. Subject: Re: ANSI C and POSIX (was Re: C/C++ knocks the crap out of Ada)
  5. Date: 11 Apr 96 11:20:00 GMT
  6. Organization: CERN European Lab for Particle Physics
  7. Message-ID: <danpop.829221600@rscernix>
  8. References: <JSA.96Feb16135027@organon.com> <4kb2j8$an0@solutions.solon.com>    <4kbrt5$k3h@mulga.cs.mu.OZ.AU> <dewar.829012486@schonberg>    <4kcpgkINNcku@keats.ugrad.cs.ubc.ca> <TYNOR.96Apr9105114@twratl.atlanta.twr.com> <4kgunm$o4o@gde.GDEsystems.COM>
  9. NNTP-Posting-Host: ues5.cern.ch
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=US-ASCII
  12. Content-Transfer-Encoding: 7bit
  13. X-Newsreader: NN version 6.5.0 #7 (NOV)
  14.  
  15. In <4kgunm$o4o@gde.GDEsystems.COM> Chet <kackman> writes:
  16.  
  17. >If i = j depends on your unit of address. If i is assumed a longword then
  18. >
  19. >     &i + 4 = &j is true
  20. >     not 
  21. >     &i + 1 = &j
  22.  
  23. No matter what type i and j are, &i + 1 == &j if they happen to be
  24. stored one after the other, without any gaps and i before j.  Read the
  25. chapter about pointer arithmetic in your C book.  Carefully, this time
  26. (that is, assuming it won't be the first time :-)
  27.  
  28. Dan
  29. --
  30. Dan Pop
  31. CERN, CN Division
  32. Email: danpop@mail.cern.ch 
  33. Mail:  CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
  34.